package com.ninthgroup.mapper;

import com.ninthgroup.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer roleId);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    /**
     * 根据条件检索用户信息
     *
     * @param roleName
     * @param roleDesc
     * @param rolePosition
     * @return
     */
    List<Role> selectByCondition(@Param("roleName") String roleName, @Param("roleDesc") String roleDesc,@Param("rolePosition") String rolePosition);

    List<Role> selectAll();

    List<String> findRoleIdByDoctorId(Integer dId);

    void deleteByDoctorId(Integer dId);

    void insertRoleId(@Param("dId") Integer dId, @Param("roleIds") Integer[] roleIds);



}